package com.github.bitsapling.sapling.controller;

import com.github.bitsapling.sapling.result.GraceJSONResult;
import com.github.bitsapling.sapling.entity.Category;
import com.github.bitsapling.sapling.service.CategoryService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("category")
public class CategoryController {
    @Resource
    private CategoryService categoryService;

    @RequestMapping("list")
    public GraceJSONResult list(){
        return GraceJSONResult.ok(categoryService.queryAll());
    }
}
